<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="CSS速查手册(持续更新中), 风栾">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <!-- Global site tag (gtag.js) - Google Analytics -->


    <title>CSS速查手册(持续更新中) | 风栾</title>
    <link rel="icon" type="image/png" href="/favicon.png">

    <link rel="stylesheet" type="text/css" href="/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">

    <script src="/libs/jquery/jquery.min.js"></script>

<meta name="generator" content="Hexo 4.2.1"><link rel="alternate" href="/atom.xml" title="风栾" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>


<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">风栾</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言板</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">风栾</div>
        <div class="logo-desc">
            
            Never really desperate, only the lost of the soul.
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://zzh0312.gitee.io" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>
</div>


        </div>

        
            <style>
    .nav-transparent .github-corner {
        display: none !important;
    }

    .github-corner {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        border: 0;
        transform: scale(1.1);
    }

    .github-corner svg {
        color: #0f9d58;
        fill: #fff;
        height: 64px;
        width: 64px;
    }

    .github-corner:hover .octo-arm {
        animation: a 0.56s ease-in-out;
    }

    .github-corner .octo-arm {
        animation: none;
    }

    @keyframes a {
        0%,
        to {
            transform: rotate(0);
        }
        20%,
        60% {
            transform: rotate(-25deg);
        }
        40%,
        80% {
            transform: rotate(10deg);
        }
    }
</style>

<a href="https://zzh0312.gitee.io" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
   data-tooltip="Fork Me" data-position="left" data-delay="50">
    <svg viewBox="0 0 250 250" aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
              fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
              fill="currentColor" class="octo-body"></path>
    </svg>
</a>
        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('https://img-blog.csdnimg.cn/20210104161132375.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5ejAzMTIxOQ==,size_16,color_FFFFFF,t_70')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">CSS速查手册(持续更新中)</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        margin: 35px 0 15px 0;
        padding-left: 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        height: calc(100vh - 250px);
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/web%E5%89%8D%E7%AB%AF/">
                                <span class="chip bg-color">web前端</span>
                            </a>
                        
                            <a href="/tags/HTML%E5%9F%BA%E7%A1%80/">
                                <span class="chip bg-color">HTML基础</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/web%E5%89%8D%E7%AB%AF/" class="post-category">
                                web前端
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2020-12-17
                </div>
                

                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    6k
                </div>
                

                

                
            </div>
        </div>
        <hr class="clearfix">
        <div class="card-content article-card-content">
            <div id="articleContent">
                <h2 id="css知识点速查"><a href="#css知识点速查" class="headerlink" title="css知识点速查"></a>css知识点速查</h2><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- css基础
    1.什么是css？
        css的英文全称为Cascading Style Sheets，中文名为级联样式单，一般也称为层叠样式表单。
    2.css的功能？
        css是一种样式表现语言，它是对网页结构语言HTML的补充。主要用于对网页样式的定义，例如布局、颜色、文本等的设计。
    3.css的作用：
        精确控制页面中的各个元素。
    4.css的发展史：
        css的版本：
            css1.0版本发布于1996年12月，只提供了一些基本的样式属性。
            css2.0版本发布于1998年5月，提供了更为强大的功能。
            css2.1版本发布于2007年，并于2011年6月正式成为标准，也是目前使用最广泛的版本。
            css3.0版本于1999年开始制定，2001年完成工作草案，是目前css最新的版本，它的最大特点是将css3的规范内容分成一系列独立的模块，更有利于浏览器产商的逐步支持。
    5.css特性：
        层叠性--继承性 --></span>
### CSS基础特性
#### 1.统一性
#### 2.便捷性
#### 3.分离性

<span class="token comment" spellcheck="true">&lt;!-- css三种引入方式：内联样式表；style="color:red;"
    内部样式表；
    &lt;link rel="stylesheet" href="style.css">
    外部样式表       * `href`指的是链接CSS的地址
                * `rel`指的是引用类型为样式表
                * `type`指的是文件类型是CSS文件--></span>
    <span class="token comment" spellcheck="true">&lt;!-- 扩展引用方式！！！！！！
        &lt;style>
            @import 'style.css'
        &lt;/style> --></span></code></pre>
<h3 id="浏览器"><a href="#浏览器" class="headerlink" title="浏览器"></a>浏览器</h3><p>常用浏览器最新版本的内核:</p>
<p>以上提到的引擎为排版引擎，浏览器还需搭载js引擎。Chromium就是Blink排版引擎+V8 js引擎。<br>国内很多浏览器用的就是Chromium的一套。</p>
<p>浏览器    内核<br>Chrome    Blink<br>IE    Trident<br>Firefox    Gecko<br>Safari    WebKit<br>Opera    Blink<br>Edge    EdgeHTML (Trident的一个分支）<br>360安全浏览器    Trident + Chromium<br>360极速浏览器    Trident + Chromium<br>QQ浏览器    Trident + Chromium<br>搜狗浏览器    Trident + Chromium<br>百度浏览器    Trident + Chromium<br>2345智能浏览器    Trident + Chromium<br>UC浏览器电脑版    Trident + Chromium<br>使用以上双核浏览器时，可以自动/手动切换内核来浏览网页。</p>
<!-- 浏览器私有前缀:
    -moz-:firefox;
    -ms-:ie;
    -webkit-:safari/chrome;
    -o-: Opera;
-->

<h3 id="css的元素显示模式"><a href="#css的元素显示模式" class="headerlink" title="css的元素显示模式"></a>css的元素显示模式</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- 常见的块元素：&lt;h1>~&lt;h6>、&lt;p>、&lt;div>、&lt;ul>、&lt;ol>、&lt;li>等；
        块元素特点：
        1.独占一行；
        2.高度、宽度及内外边距可以调节；
        3.宽度默认是父级宽度的100%；
        4.相当于一个容器及盒子，被内容撑开。
        注意：文字内不能使用块级元素，比如&lt;p>
    常见的行内元素：&lt;a>、&lt;strong>、&lt;b>、&lt;em>、&lt;i>、&lt;del>、&lt;s>、&lt;ins>、&lt;u>、&lt;span>等；
        行内元素特点：
        1.一行可显示多个；
        2.高宽直接设置无效；
        3.行内元素只能放文本及行内元素。
        注意：一般a标签内可放块元素。
    行内块元素：&lt;img/> &lt;input/> &lt;td> 
        特点：
        1.一行可以显示多个（行内元素特点）；
        2.默认宽度即内容宽度（行内元素特点）；
        3.高度，行高，内外边距都可调节（块元素特点）。 --></span>
    <span class="token comment" spellcheck="true">&lt;!-- 模式转换：
    display:block;(块元素) inline;(行内元素) inline-block;(行内块元素) --></span>
    <span class="token comment" spellcheck="true">&lt;!-- min-width,max-width使用较少，也比较简单，有兼容性的，只能在IE9及以上使用--></span>

<span class="token comment" spellcheck="true">&lt;!--显示和隐藏
visibility:hidden;元素不可见，但占据位置
display:none;元素不可见不占据位置
--></span>
</code></pre>
<h3 id="字体样式"><a href="#字体样式" class="headerlink" title="字体样式"></a>字体样式</h3><pre class=" language-css"><code class="language-css"> <span class="token comment" spellcheck="true">/* 字体 */</span>
            <span class="token property">font-family</span><span class="token punctuation">:</span> <span class="token string">'Times New Roman'</span>, Times, serif<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 大小跟单位 */</span>
            <span class="token property">font-size</span><span class="token punctuation">:</span> <span class="token number">16</span>px<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 粗细 normal正常相当于number为400；
            bold粗体，相当于number=700；
            bolder特粗体；
            lighter细体；
            nubmer不跟单位 */</span>
            <span class="token property">font-weight</span><span class="token punctuation">:</span> normal<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 样式，normal标准字体样式；
            italic斜体样式；
            平时很少给文字加斜体，反而要给em，i取消斜体 */</span>
            <span class="token property">font-style</span><span class="token punctuation">:</span> normal<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 字体样式的复合写法：
            font: font-style font-weight font-size/line-height font-family; 
            其中size和family不可省略*/</span>
</code></pre>
<pre class=" language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h3</span><span class="token punctuation">></span></span>字体类型<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h3</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- font-family:serif;   //serif衬线字体，主要用于标题显示
                          //sans-serif非衬线字体
                          //monospace等宽字体 --></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>字体样式一般给body<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">></span></span>单行文字垂直居中：line-height:30px;(行高=上空隙+文字高度+下空隙)<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- 文字间隔：letter-spacing: 2px; (可为负值) --></span></code></pre>
<pre class=" language-css"><code class="language-css">字体的单位有很多，现在先简要的介绍一下

* `px`像素单位，网页默认的字体大小是<span class="token number">16</span>px
* `pt`字号，网页默认的字号大小是<span class="token number">12</span>pt
* `vw`响应式字体大小，以当前屏幕宽度的百分比为大小。`vw`的全称叫`viewport width`，<span class="token number">2</span>vw代表当前屏幕宽度的百分之<span class="token number">2</span>
* `vh`响应式字体单位，以当前屏幕的高度百分比在大小，<span class="token number">1</span>vh相当于屏幕高度百分之<span class="token number">1</span>
* `rem`它也是一个响应式单位，后期讲解。rem的全称叫root element也就是根元素，网页根元素就是`html`元素，所以我们可以使用它来做标准<span class="token number">1</span>rem相当于一个网页字体，一个网页字体默认就是<span class="token number">16</span>px

<span class="token comment" spellcheck="true">/*自定义字体*/</span>
<span class="token atrule"><span class="token rule">@font-face</span></span><span class="token punctuation">{</span>
    <span class="token property">font-family</span><span class="token punctuation">:</span>one<span class="token punctuation">;</span>    <span class="token comment" spellcheck="true">/*这个字体的名称我们定义为one*/</span>
    <span class="token property">src</span><span class="token punctuation">:</span><span class="token url">url(./font/one.ttc)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></code></pre>
<h3 id="文本样式"><a href="#文本样式" class="headerlink" title="文本样式"></a>文本样式</h3><pre class=" language-css"><code class="language-css"><span class="token comment" spellcheck="true">/* 文本样式 */</span>
            <span class="token property">color</span><span class="token punctuation">:</span> aqua<span class="token punctuation">;</span>
            <span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 水平对齐left,center,right
                justify 文字左右对齐*/</span>
            <span class="token property">text-decoration</span><span class="token punctuation">:</span> none<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 装饰文本none默认无，上划线overline；中划线line-through；下划线underline； */</span>
            <span class="token comment" spellcheck="true">/* 重点添加删除下划线 */</span>
            <span class="token property">text-indent</span><span class="token punctuation">:</span> <span class="token number">10</span>px<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 首行缩进2em； */</span>
            <span class="token property">text-transform</span><span class="token punctuation">:</span> uppercase<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*大写字母
            * `lowercase`小写字母
            * `capitalize`每个单词首字母大写*/</span>
            <span class="token property">line-height</span><span class="token punctuation">:</span> <span class="token number">26</span>px<span class="token punctuation">;</span>
            <span class="token comment" spellcheck="true">/* 此为行间距：上间距+文字高度+下间距；此属性只更改上下间距 */</span>
        值       描述
        normal    默认。设置合理的行间距。
        number    设置数字，此数字会与当前的字体尺寸相乘来设置行间距。
        length    设置固定的行间距。
          <span class="token number">%</span>        基于当前字体尺寸的百分比行间距。
        inherit    规定应该从父元素继承 line-height 属性的值。


            <span class="token property">letter-spacing</span><span class="token punctuation">:</span><span class="token number">2</span>px<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*-2px增大缩小字符间距*/</span>
            <span class="token property">word-spacing</span><span class="token punctuation">:</span><span class="token number">2</span>px<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*单词之间间距*/</span>
            <span class="token property">vertical-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*文本行垂直居中
            text-top靠上
            text-bottom靠下*/</span>

            <span class="token comment" spellcheck="true">/*文本超出省略号显示*/</span>
            <span class="token property">white-space</span><span class="token punctuation">:</span>nowrap<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*不换行*/</span>
            <span class="token property">overflow</span><span class="token punctuation">:</span>hidden<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*溢出隐藏*/</span>
            <span class="token property">text-overflow</span><span class="token punctuation">:</span>ellipsis<span class="token punctuation">;</span><span class="token comment" spellcheck="true">/*隐藏用省略号*/</span>

            <span class="token comment" spellcheck="true">/*p标签纯数字不换行问题 解决：
            word-break: break-all;
            这里文字会换行但数字不会！字母也不换*/</span>

            <span class="token comment" spellcheck="true">/*同一行的元素，按钮和输入框对不齐的解决方法:
            只要在前面的那个输入框里面加上一个*/</span>
            <span class="token property">vertical-align</span><span class="token punctuation">:</span> bottom<span class="token punctuation">;</span></code></pre>
<p>文本划线样式：<a href="https://juejin.cn/post/6947866495309316104" target="_blank" rel="noopener">https://juejin.cn/post/6947866495309316104</a></p>
<h3 id="列表样式"><a href="#列表样式" class="headerlink" title="列表样式"></a>列表样式</h3><pre class=" language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span>列表样式<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- list-style-image: //列表项前面的标记；
    list-style-position:outside; //在什么位置显示列表项前面的标记；inside(内，外)
    list-style-type:disc; //设置图标类型：circle、square、decimal、none、low-alpha、upper-alpha...
    list-style:list-style-image list-style-position list-style-type； --></span></code></pre>
<h3 id="emmet语法"><a href="#emmet语法" class="headerlink" title="emmet语法"></a>emmet语法</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- emmet语法：
    div*4 快速生成4个div；
    div>span 包含span的div；
    div+p 生成兄弟标签；
    p.class/#id 生成类或ID；
    .demo&amp;*5 生成5个有序号；
    div{文字} 生成包含文字；
    css：
    h100 设高；
    w200 设宽； --></span></code></pre>
<h3 id="背景样式"><a href="#背景样式" class="headerlink" title="背景样式"></a>背景样式</h3><pre class=" language-html"><code class="language-html"> <span class="token comment" spellcheck="true">&lt;!-- 1.css背景
    background-color:transparent;(默认：透明的)
    background-image:url(url);
    2.背景平铺
    background-repeat:no-repeat;(不平铺；默认平铺)repeat-x(沿x轴平铺) repeat-y(沿y轴平铺) 
    3.背景图片位置
    background-position:20px 50px;x坐标 y坐标(也可写一个)
    background-position:center right; 水平靠右
    background-position:right; 靠右，默认垂直居中
    background-position:20px center;
    4.背景图像固定
    background-attachment:scroll; 默认：随图像内容滚动；fixed固定
    5.背景复合写法
    background:transparent url(image.jpg) repeat-y fixed top;
    6.背景色透明度效果
    backgorund:rgba(0,0,0,0.6);
    IE9+版本浏览器支持，盒子内容不受影响。 --></span></code></pre>
<h3 id="css三大特性"><a href="#css三大特性" class="headerlink" title="css三大特性"></a>css三大特性</h3><pre class=" language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h3</span><span class="token punctuation">></span></span>css三大特性-<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h3</span><span class="token punctuation">></span></span>
    层叠性（对同一个元素多次添加属性时，最新添加生效），继承性（当子元素没有设置属性时，对父元素设置属性时子元素继承其属性），优先级
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span>优先级<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- 选择器                选择器权重
    继承或*                 0,0,0,0
    元素选择器              0,0,0,1
    类选择器，伪类选择器      0,0,1,0
    ID选择器               0,1,0,0
    行内样式style=""        1,0,0,0
    !important 重要的      无穷大 --></span>
    <span class="token comment" spellcheck="true">&lt;!-- 例：&lt;style>
        #father{color: red;}
        p{color: aqua;}
    &lt;/style>
    &lt;div id="father">
        &lt;p>此时红色虽为ID，但为父级对p表继承；p则是元素选择器，优先级比继承高，即表现为蓝色。&lt;/p>
        复合选择器权重会叠加。 
        .nav li 权重大于 .pink
    &lt;/div> --></span></code></pre>
<h3 id="选择器"><a href="#选择器" class="headerlink" title="选择器"></a>选择器</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!--    （1）    id 选择器（#myid）
    （2）    类选择器（.myclassname）
    （3）    标签选择器（div,h1,p）     
    （4）    后代选择器（h1 p）
    （5）    相邻后代选择器（子）选择器（ul>li）
    （6）    兄弟选择器（li~a）（li后面的兄弟a）
    （7）    相邻兄弟选择器（li+a）
    （8）    属性选择器（a[rel="external"],[src $= ".png"]结尾匹配,[src ^= "img"]开头匹配，[src *= "3"]通配）
    （9）    伪类选择器（a:hover,li:nth-child）
    （10）伪元素选择器（::before、::after）
    （11）通配符选择器（*）
    包含属性值的选择器写法：
        &lt;p name="name huawei">&lt;/p>
        p[name="name huawei"]{color:red;}
        p[name~="name"]{color:red;}   //表包含name选择；
        &lt;p name="name-huawei">&lt;/p>
        p[name|="name"]{color:red;}   //表选择前缀；
--></span>g
属性选择器和类选择器伪类选择器权重相同，
伪元素选择器会创建一个元素，属于行内元素，
伪元素和标签选择器权重一样</code></pre>
<h3 id="伪类选择器"><a href="#伪类选择器" class="headerlink" title="伪类选择器"></a>伪类选择器</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- a:link       选择所有未被访问的链接
        a:visited    选择所有已被访问的链接
        a:hover      选择鼠标指针位于其上的链接
        a:active     选择鼠标按下未弹起的链接 
        注意：
        1.颠倒顺序会失效，严格按照LVHA的顺序来，love hate；
        2.去除链接下划线常用text-decoration:none;
        3.实际开发中常用a 和a:hover两个。
        光标伪类选择器：input:focus{};主要用于input；
        --></span></code></pre>
<h3 id="盒子边框"><a href="#盒子边框" class="headerlink" title="盒子边框"></a>盒子边框</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- 边框：     谨记，画三角形时会用到：盒子的边框是向外撑开盒子，比如设盒子宽100px，边框2px，此时盒子整体占空间宽度为100加左右宽度，合计104px！！！
    border-width:5px;(边框粗细，一般都用px)
    border-style:solid;(实线边框)dashed(虚线边框) dotted(点线边框)double(双线)groove(线槽)
    border-color:red;(边框颜色)
    边框简写：border:5px solid red;
    border-top:bottom;left;right;
        border-collapse:collapse;(合并重叠相邻单元格边框！！！！)
    内外边距margin(边框与外部盒子的距离),
     padding:5px;(上下左右)
     pading:5px 10px;(上下 左右)
     padding:5px 10px 20px;(上 左右 下)
     padding:5px 10px 20px 30px;(上 右 下 左)(边框与内容的距离) 
    注意：盒子已设宽度和高度后，再指定内边距，会撑大盒子；没设则不会。
    margin的方位同padding--></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h2</span><span class="token punctuation">></span></span>css3新增，IE9+支持<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h2</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- 1.圆角边框：border-radius:10px;(使10px为半径的圆内切盒子的四个角，从而形成了圆角矩形)
    50%；(即高度宽度的一半，为圆)
    border-style:dotted;   边框样式
    border:左上 右上 右下 左下;
    border:左上  右上左下  右下;
    border:左上右下  右上左下;
    border-top-left-radius:; --></span>
    <span class="token comment" spellcheck="true">&lt;!-- 2.盒子阴影：box-shadow：10px(水平位置) 20px(垂直位置) 30px(模糊距离) 40px(阴影大小) rgba(0,0,0,0.3) inset;
    inset;(内阴影)
    3.(了解)文字阴影：text-shadow:10px(水平位置) 20px(垂直位置) 30px(模糊距离) rgba(0,0,0,0.3); --></span>


border-image-slice: 10;   /*距离上下左右均为10px;*/
border-image-slice: 10 30;   /*距离上下10px,左右30px;*/
border-image-slice: 10 30 20;   /*距离上10px,下20px,左右30px;*/
border-image-slice: 10 30 20 40;   /*距离上10px,右30px,下20px,左40px;*/
</code></pre>
<h3 id="盒子阴影"><a href="#盒子阴影" class="headerlink" title="盒子阴影"></a>盒子阴影</h3><h3 id="盒子模型与BFC"><a href="#盒子模型与BFC" class="headerlink" title="盒子模型与BFC"></a>盒子模型与BFC</h3><p><img src="https://img-blog.csdnimg.cn/20210322164812739.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5ejAzMTIxOQ==,size_16,color_FFFFFF,t_70" alt="IE盒模型"></p>
<p><img src="https://img-blog.csdnimg.cn/20210322164820502.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5ejAzMTIxOQ==,size_16,color_FFFFFF,t_70" alt="标准盒模型"></p>
<h3 id="浮动"><a href="#浮动" class="headerlink" title="浮动"></a>浮动</h3><pre class=" language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>h1</span><span class="token punctuation">></span></span>浮动<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>h1</span><span class="token punctuation">></span></span>
    <span class="token comment" spellcheck="true">&lt;!-- 标准流（文档流）：块元素按行从上到下顺序排列；行内元素从左往右依次排列，遇到右边缘自动换行。
    浮动float 块元素横向排列用浮动，浮动的盒子不再保留原先的位置；
    float对行内元素使用时则使其具有行内块元素相似的特性，而不需要转换display可以直接给宽高；
    当浮动的块元素处于文档流块元素上方时会挤走文档流里的文字；
    任何元素都可以直接添加浮动，如果块级元素没有设置宽度，默认和父级一样宽，添加浮动后则由内容撑开；
    一个元素使用浮动时，其兄弟元素都要加浮动；
    父盒子不给高度，子盒子添加浮动，此时父盒子会塌陷高度变成0，影响下面的布局；这时我们需要清除浮动：
    一般有四种方法：
        1.隔墙法，（w3c推荐的做法）：在浮动元素末尾添加&lt;div style="clear: both;">&lt;/div>或&lt;br>等；
        优点：通俗易懂，方便
        缺点：添加无意义标签，语义化差
        2.给父盒子添加:overflow:hidden或auto，scroll;缺点无法显示溢出的部分；
            overflow:visible(默认);auto(自动添加滚动条)、hidden(隐藏超出内容)、scroll(一直显示滚动条)
        优点：代码简洁
        缺点：内容增多的时候容易造成不会自动换行导致内容被隐藏掉，无法显示要溢出的元素
        3.:after法：加入如下样式并给父元素加上类名clearfix， 百度淘宝等使用的此方法，
            .clearfix:after{
                content: "";
                display: block;
                height: 0;
                clear: both;
                visibility: hidden;
            }
            .clearfix{
                ie6,ie7专有
                *zoom: 1;
            }
        优点：符合闭合浮动思想，结构语义化正确
        缺点：ie6-7不支持伪元素：after，使用zoom:1触发hasLayout.
        4.双伪元素清除：加入如下样式并给父元素加上类名clearfix，  小米腾讯等使用此方法，
            .clearfix:before,.clearfix:after{
                content: "";
                display: table;
            }
            .clearfix:after{
                clear: both;
            }
            .clearfix{
                *zoom: 1;
            }
        优点：代码更简洁
        缺点：用zoom:1触发hasLayout.
    父盒子无高度，子盒子浮动，此时影响下面布局则需清除浮动。

    双飞翼布局：
            1.使用float使左中右三列浮动；
            2.使用负margin让左右两列与中间列处于同一水平线上；
            3.在中间列增加一个div，设置margin值为左右两列的宽度；
            4.清除浮动。
        优点：
            1.中间列宽度自适应；
            2.中间内容先加载；
            3.浏览器兼容性好。

 --></span></code></pre>
<h3 id="定位"><a href="#定位" class="headerlink" title="定位"></a>定位</h3><h3 id="常见图片格式"><a href="#常见图片格式" class="headerlink" title="常见图片格式"></a>常见图片格式</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- 1.jpg格式：有损压缩，色彩信息保留较好，高清，产品类图片经常使用；
    2.gif格式：最多只能储存256色，通常用来显示简单图形及字体，可保存透明背景和动画效果，实际常用小动画效果；
    3.png格式：新兴网络图形格式，freworks源文件，结合gif和jpg的优点，存储形式丰富，能够保持透明背景，通常用于切成背景透明的图片；
    4.PSD格式：ps专用格式，可存放图层、通道、遮罩等多种设计稿，可直接从上面复制文字，获得图片，以及测量大小和距离。
        此处为ps切图内容，具体见https://www.bilibili.com/video/BV14J4114768/?p=190 --></span></code></pre>
<h3 id="css书写顺序"><a href="#css书写顺序" class="headerlink" title="css书写顺序"></a>css书写顺序</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- 按以下顺序：
    1.布局定位属性：display/position/float/clear/visibility/overflow;
    2.自身属性：width/height/margin/padding/border/background;
    3.文本属性：color/font/text-decoration/text-align/vertical-align/white-space/break-word;
    4.其他属性：content/cursor/border-radius/box-shadow/text-shadow/background:linear-fradient... --></span></code></pre>
<h3 id="精灵图及字体图标"><a href="#精灵图及字体图标" class="headerlink" title="精灵图及字体图标"></a>精灵图及字体图标</h3><pre class=" language-html"><code class="language-html">    1.精灵图
    有效减少服务器接收图片的次数；
    将网页中的一些固定的小图片集成到一张大图片中，通过
    backgroud-position
    图片针对页面偏移
    实现：1.盒子给宽高；
            2.设背景 backgroud:url(.png);
         3.定位置 backgroud-position:-100px -100px;
    综合写法：
    backgroud:url(.png) no-repeat -100px -100px;

    2.字体图标iconfont
    轻量级，比图像小；灵活性高 可设颜色大小阴影等；兼容性好；
    会用就行；
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>iconfont<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token entity" title="&#xec25;">&amp;#xec25;</span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">></span></span>

</code></pre>
<h3 id="颜色渐变"><a href="#颜色渐变" class="headerlink" title="颜色渐变"></a>颜色渐变</h3><pre><code></code></pre><p>不透明度</p>
<h2 id="css3部分"><a href="#css3部分" class="headerlink" title="css3部分"></a>css3部分</h2><h3 id="过渡"><a href="#过渡" class="headerlink" title="过渡"></a>过渡</h3><pre class=" language-css"><code class="language-css">过渡transition ie<span class="token number">9</span><span class="token punctuation">(</span>以下不支持<span class="token punctuation">)</span>
    <span class="token property">transition</span><span class="token punctuation">:</span> 过渡属性 变化时间 运动曲线 延迟开始<span class="token punctuation">;</span>
    <span class="token property">transition</span><span class="token punctuation">:</span>width <span class="token number">.5</span>s ease <span class="token number">1</span>s,height <span class="token number">.5</span>s ease <span class="token number">1</span>s<span class="token punctuation">;</span>
    linear 匀速 ease 由快到慢 ease-in 由慢到快
    ease-out 由较快到较慢 ease-in-out 由慢到快再到慢</code></pre>
<h3 id="变换"><a href="#变换" class="headerlink" title="变换"></a>变换</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- 2D转换 (tranform)转换  不会影响其他元素
        translate 移动    rotate 旋转   scale 缩放
            transform:translate(X,Y);
            transform:translateX(10px);
            transform:translateY(100%);自身为参照

            transform:rotate(45deg);顺时针旋转45度
            transform-origin:x y; 转换中心点 left bottom默认 50% 50%
            transform:scale(x,y); (2,2)宽，高倍数 (2)等比例
            transform-origin:x y; 转换中心点 left bottom默认 50% 50%
        2D转换综合写法（有顺序，按照顺序写）
        transform:translate() rotate() scale();

        1、背对屏幕不可见：backface-visibility: hidden;

        2、开启3d空间,给3d效果元素的父元素设置：transform-style: preserve-3d;

        3、缩放: 元素缩放的系数，scale(宽度系数,高度的系数)   transform: scale(1.5,2);

        4、斜切:skew(沿x轴斜切,沿y轴斜切)   transform: skew(0deg,0deg);

        5、景深透视属性: 是一个近大远小的效果,视觉比较合理的取值范围800px-1500px
        给效果元素的父元素设置该属性   perspective: 1000px;

        6、z轴的位移：正值向屏幕外,负值向屏幕里   transform: translateZ(30px);
 --></span>
</code></pre>
<h3 id="动画"><a href="#动画" class="headerlink" title="动画"></a>动画</h3><pre class=" language-html"><code class="language-html"><span class="token comment" spellcheck="true">&lt;!-- animation动画
        动画定义：
                (from to 等价0% 100%)
        @keyframes animation{
            0%{
                width:100px;
            }
            100%{
                width:200px;
            }
        }
        动画调用：
        animation-name:animation;动画名称
        animation-duration:2s;  持续时间
        animation-timing-function:ease;  运动曲线
        animation-delay:1s;   延时0开始
        animation-iteration-count:2; 重复次数 infinite无数次
        animation-direction:normal; 正常 alternate下一周期逆向播放
        animation-fill-mode:forwards;forwards保持移动后位置，默认backwards回到起始位置
        animation-play-state:pause; pause暂停，默认running
        steps(5) 分步完成动画，有了就不写ease运动曲线

        简写：
        animation:name duration timing-function delay iteration-count direction fill-mode;
 --></span>

    <span class="token comment" spellcheck="true">&lt;!-- 3D转换
    tranform:translate3d(100px,100px,100px); 3d不能省略
    透视perspective
        视距
        3D旋转rotate3d
 --></span></code></pre>
<h3 id="flex布局"><a href="#flex布局" class="headerlink" title="flex布局"></a>flex布局</h3><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span></span><span class="token punctuation">{</span>
    <span class="token property">display</span><span class="token punctuation">:</span> -webkit-flex<span class="token punctuation">;</span> <span class="token comment" spellcheck="true">/* Safari Webkit 内核的浏览器，必须加上-webkit前缀。 */</span>
    <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> inline-flex<span class="token punctuation">;</span> <span class="token comment" spellcheck="true">/* 行内元素开启弹性布局*/</span>

、、、兼容写法、、、
    <span class="token property">display</span><span class="token punctuation">:</span>-webkit-box<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> -moz-box<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> -ms-flexbox<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> -webkit-flex<span class="token punctuation">;</span>
    <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
、、、、、、</code></pre>
<h4 id="容器属性"><a href="#容器属性" class="headerlink" title="容器属性"></a>容器属性</h4><pre class=" language-css"><code class="language-css">flex-direction   决定主轴的方向
flex-wrap        容器排布在一条线（轴线）上，排不满是否换行
flex-flow        是flex-direction属性和flex-wrap属性的简写形式，默认值为row nowrap
justify-content  定义了在主轴上的对齐方式
align-items      定义了在交叉轴上如何对齐。
align-content    定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用</code></pre>
<h5 id="flex-direction"><a href="#flex-direction" class="headerlink" title="flex-direction"></a>flex-direction</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
     <span class="token property">flex-direction</span><span class="token punctuation">:</span> row | row-reverse | column | column-reverse<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
    row（默认值）：主轴为水平方向，起点在左端。
    、、、兼容写法、、、
      <span class="token property">box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">box-direction</span><span class="token punctuation">:</span>normal<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-direction</span><span class="token punctuation">:</span>normal<span class="token punctuation">;</span>
    <span class="token property">-moz-box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">-moz-box-direction</span><span class="token punctuation">:</span>normal<span class="token punctuation">;</span>
    <span class="token property">flex-direction</span><span class="token punctuation">:</span>row<span class="token punctuation">;</span>
    <span class="token property">-webkit-flex-direction</span><span class="token punctuation">:</span>row<span class="token punctuation">;</span>
、、、、、、
    row-reverse：主轴为水平方向，起点在右端。
    、、、兼容写法、、、
    <span class="token property">box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">-moz-box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">-moz-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">flex-direction</span><span class="token punctuation">:</span>row-reverse<span class="token punctuation">;</span>
    <span class="token property">-webkit-flex-direction</span><span class="token punctuation">:</span>row-reverse<span class="token punctuation">;</span>
、、、、、、
    column：主轴为垂直方向，起点在上沿。
    、、、兼容写法、、、
    <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-direction</span><span class="token punctuation">:</span>normal<span class="token punctuation">;</span>
    <span class="token property">-moz-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-moz-box-direction</span><span class="token punctuation">:</span>normal<span class="token punctuation">;</span>
    <span class="token property">flex-direction</span><span class="token punctuation">:</span>column<span class="token punctuation">;</span>
    <span class="token property">-webkit-flex-direction</span><span class="token punctuation">:</span>column<span class="token punctuation">;</span>
、、、、、、
    column-reverse：主轴为垂直方向，起点在下沿。
    、、、兼容写法、、、
     <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">-moz-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-moz-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span> 
    <span class="token property">box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">flex-direction</span><span class="token punctuation">:</span>column-reverse<span class="token punctuation">;</span>
    <span class="token property">-webkit-flex-direction</span><span class="token punctuation">:</span>column-reverse<span class="token punctuation">;</span>
    、、、、、、</code></pre>
<h5 id="flex-wrap"><a href="#flex-wrap" class="headerlink" title="flex-wrap"></a>flex-wrap</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
     <span class="token property">flex-wrap</span><span class="token punctuation">:</span> nowrap | wrap | wrap-reverse<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

    nowrap（默认）：不换行
    <span class="token property">-webkit-flex-wrap</span><span class="token punctuation">:</span>nowrap<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-lines</span><span class="token punctuation">:</span>single<span class="token punctuation">;</span>
    <span class="token property">-moz-flex-wrap</span><span class="token punctuation">:</span>nowrap<span class="token punctuation">;</span>
    <span class="token property">flex-wrap</span><span class="token punctuation">:</span>nowrap<span class="token punctuation">;</span>

    wrap：换行，第一行在上方。
  、、、兼容写法、、、
    <span class="token property">-webkit-flex-flow</span><span class="token punctuation">:</span>row wrap<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-lines</span><span class="token punctuation">:</span>multiple<span class="token punctuation">;</span>
　　<span class="token property">-moz-flex-flow</span><span class="token punctuation">:</span>row wrap<span class="token punctuation">;</span>
    <span class="token property">box-orient</span><span class="token punctuation">:</span>horizontal<span class="token punctuation">;</span>
    <span class="token property">box-lines</span><span class="token punctuation">:</span>multiple<span class="token punctuation">;</span>
    <span class="token property">flex-flow</span><span class="token punctuation">:</span>row wrap<span class="token punctuation">;</span>
        、、、、、、

    wrap-reverse：换行，第一行在下方。</code></pre>
<h5 id="flex-flow"><a href="#flex-flow" class="headerlink" title="flex-flow"></a>flex-flow</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
     <span class="token property">flex-flow</span><span class="token punctuation">:</span> &lt;flex-direction> || &lt;flex-wrap>
<span class="token punctuation">}</span>
</code></pre>
<h5 id="justify-content"><a href="#justify-content" class="headerlink" title="justify-content"></a>justify-content</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
     <span class="token property">justify-content</span><span class="token punctuation">:</span> flex-start | flex-end | center | space-between | space-around<span class="token punctuation">;</span>
<span class="token punctuation">}</span>

    flex-start（默认值）：左对齐
    flex-end：右对齐
    <span class="token property">center</span><span class="token punctuation">:</span> 居中对齐
    、、、兼容写法、、、
     <span class="token property">-webkit-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-webkit-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">-moz-box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span>
    <span class="token property">-moz-box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">box-orient</span><span class="token punctuation">:</span>vertical<span class="token punctuation">;</span> 
    <span class="token property">box-direction</span><span class="token punctuation">:</span>reverse<span class="token punctuation">;</span>
    <span class="token property">flex-direction</span><span class="token punctuation">:</span>column-reverse<span class="token punctuation">;</span>
    <span class="token property">-webkit-flex-direction</span><span class="token punctuation">:</span>column-reverse<span class="token punctuation">;</span>
    、、、、、、

    space-between：两端对齐，项目之间的间隔都相等。
    space-evenly：项目之间间隔平分。
    space-around：每个项目两侧的间隔相等。所以，项目之间的间隔比项目与边框的间隔大一倍。</code></pre>
<h5 id="align-items"><a href="#align-items" class="headerlink" title="align-items"></a>align-items</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
     <span class="token property">align-items</span><span class="token punctuation">:</span> flex-start | flex-end | center | baseline | stretch<span class="token punctuation">;</span>

    flex-start： 交叉轴（垂直方向）的起点对齐。
    flex-end：   交叉轴垂直方向）的终点对齐。
    center：     交叉轴垂直方向）的中点对齐。
    、、、兼容写法、、、
<span class="token property">align-items</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span>
<span class="token property">-webkit-align-items</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span>
<span class="token property">box-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span>
<span class="token property">-moz-box-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span>
<span class="token property">-webkit-box-align</span><span class="token punctuation">:</span>center<span class="token punctuation">;</span>
 、、、、、、

    <span class="token property">baseline</span><span class="token punctuation">:</span>    项目的【第一行文字】的基线对齐。
    stretch     （默认值）：如果项目未设置高度或设为auto，将占满整个容器的高度。</code></pre>
<h5 id="align-content"><a href="#align-content" class="headerlink" title="align-content"></a>align-content</h5><pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.box</span> </span><span class="token punctuation">{</span>
      <span class="token property">align-content</span><span class="token punctuation">:</span> flex-start | flex-end | center | space-between | space-around | stretch<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
    flex-start：与交叉轴的起点对齐。
    flex-end：与交叉轴的终点对齐。
    center：与交叉轴的中点对齐。
    space-between：与交叉轴两端对齐，轴线之间的间隔平均分布。
    space-around：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍。
    stretch（默认值）：轴线占满整个交叉轴。</code></pre>
<h4 id="项目（-box-child-子元素）"><a href="#项目（-box-child-子元素）" class="headerlink" title="项目（.box-child 子元素）"></a>项目（.box-child 子元素）</h4><pre class=" language-css"><code class="language-css"><span class="token selector">order            定义项目的排列顺序。数值越小，排列越靠前，默认为0
flex-grow        定义项目的放大比例，默认为0，即如果存在剩余空间，也不放大
flex-shrink      定义了项目的缩小比例，默认为1，即如果空间不足，该项目将缩小
flex-basis       定义了在分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，计算主轴是否有多余空间。它的默认值为auto，即项目的本来大小
flex             是flex-grow, flex-shrink 和 flex-basis的简写，默认值为0 1 auto。后两个属性可选 

、、、兼容写法、、、
box-flex<span class="token pseudo-class">:num</span>;
-webkit-box-flex<span class="token pseudo-class">:num</span>;
-moz-box-flex<span class="token pseudo-class">:num</span>;
flex<span class="token pseudo-class">:num</span>;
-webkit-flex<span class="token pseudo-class">:num</span>;

    align-self       align-self属性允许单个项目有与其他项目不一样的对齐方式，可覆盖align-items属性。默认值为auto，表示继承父元素的align-items属性，如果没有父元素，则等同于stretch

##### align-self 
<span class="token class">.box-child</span></span><span class="token punctuation">{</span>
<span class="token property">align-self</span><span class="token punctuation">:</span> auto | flex-start | flex-end | center | baseline | stretch<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
auto： （ 默认值）交叉轴的起点对齐
flex-start： 交叉轴的起点对齐
flex-end： 交叉轴的终点对齐
<span class="token property">center</span><span class="token punctuation">:</span> 交叉轴的据中对齐
baseline 项目的第一行文字的基线对齐
stretch 轴线占满整个交叉轴
</code></pre>
<h3 id="table布局"><a href="#table布局" class="headerlink" title="table布局"></a>table布局</h3><p>display:table;</p>
<table>
<thead>
<tr>
<th>display</th>
<th>说明</th>
</tr>
</thead>
<tbody><tr>
<td>table</td>
<td>此元素 会作为块级表格来显示(类似table) , 表格前后带有换行符。</td>
</tr>
<tr>
<td>table-row-group</td>
<td>此元素会作为一 个或多个行的分组来显示(类似tbody ).</td>
</tr>
<tr>
<td>table-header-group</td>
<td>此元素会作为- 个或多个行的分组来显示(类似thead ).</td>
</tr>
<tr>
<td>table-footer-group</td>
<td>此元素会作为一个或多个行的分组来显示(类似tfoot ).</td>
</tr>
<tr>
<td>table-row</td>
<td>此元素会作为-个表格行显示(类似tr ).</td>
</tr>
<tr>
<td>table-column-group</td>
<td>此元素会作为- 个或多个列的分组来显示(类似colgroup ).</td>
</tr>
<tr>
<td>table-column</td>
<td>此元素会作为一 个单元格列显示(类似col )</td>
</tr>
<tr>
<td>table-cell</td>
<td>此元素会作为一 个表格单元格显示(类似td和th )</td>
</tr>
<tr>
<td>table-caption</td>
<td>此元素会作为- 个表格标题显示(类似caption)</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody></table>
<h3 id="水平垂直居中"><a href="#水平垂直居中" class="headerlink" title="水平垂直居中"></a>水平垂直居中</h3><p>方法：（宽高未知）</p>
<ol>
<li><p>子绝父相： </p>
<pre class=" language-html"><code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>parent<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>son<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">></span></span></code></pre>
<pre class=" language-css"><code class="language-css"><span class="token selector"><span class="token class">.parent</span> </span><span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> aqua<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector"><span class="token class">.son</span> </span><span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">;</span>
            <span class="token property">right</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">;</span>
            <span class="token property">bottom</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">;</span>
            <span class="token property">left</span><span class="token punctuation">:</span> <span class="token number">0</span><span class="token punctuation">;</span>
            <span class="token property">margin</span><span class="token punctuation">:</span> auto<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
        <span class="token punctuation">}</span></code></pre>
</li>
<li><p>定位加平移：</p>
<pre class=" language-css"><code class="language-css">   <span class="token selector"><span class="token class">.parent</span> </span><span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> relative<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> aqua<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector"><span class="token class">.son</span> </span><span class="token punctuation">{</span>
            <span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">top</span><span class="token punctuation">:</span> <span class="token number">50%</span><span class="token punctuation">;</span>
            <span class="token property">left</span><span class="token punctuation">:</span> <span class="token number">50%</span><span class="token punctuation">;</span>
            <span class="token property">transform</span><span class="token punctuation">:</span> <span class="token function">translate</span><span class="token punctuation">(</span>-<span class="token number">50%</span>, -<span class="token number">50%</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
        <span class="token punctuation">}</span></code></pre>
</li>
<li><p>flex布局：</p>
<pre class=" language-css"><code class="language-css"> <span class="token selector"><span class="token class">.parent</span> </span><span class="token punctuation">{</span>
            <span class="token property">display</span><span class="token punctuation">:</span> flex<span class="token punctuation">;</span>
            <span class="token property">justify-content</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
            <span class="token property">align-items</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> aqua<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector"><span class="token class">.son</span> </span><span class="token punctuation">{</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
        <span class="token punctuation">}</span></code></pre>
</li>
<li><p>table-cell布局：</p>
<pre class=" language-css"><code class="language-css">        <span class="token selector"><span class="token class">.parent</span> </span><span class="token punctuation">{</span>
            <span class="token property">display</span><span class="token punctuation">:</span> table-cell<span class="token punctuation">;</span>
            <span class="token property">vertical-align</span><span class="token punctuation">:</span> middle<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">400</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> aqua<span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token selector"><span class="token class">.son</span> </span><span class="token punctuation">{</span>
            <span class="token property">margin</span><span class="token punctuation">:</span> <span class="token number">0</span> auto<span class="token punctuation">;</span>
            <span class="token property">width</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">height</span><span class="token punctuation">:</span> <span class="token number">100</span>px<span class="token punctuation">;</span>
            <span class="token property">background-color</span><span class="token punctuation">:</span> red<span class="token punctuation">;</span>
        <span class="token punctuation">}</span></code></pre>
</li>
</ol>
<h3 id="各个单位"><a href="#各个单位" class="headerlink" title="各个单位"></a>各个单位</h3><p>px em rem vh vw</p>

            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">风栾</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="https://zzh0312.gitee.io/posts/10078.html">https://zzh0312.gitee.io/posts/10078.html</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">风栾</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/web%E5%89%8D%E7%AB%AF/">
                                    <span class="chip bg-color">web前端</span>
                                </a>
                            
                                <a href="/tags/HTML%E5%9F%BA%E7%A1%80/">
                                    <span class="chip bg-color">HTML基础</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="/medias/reward/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    
        <style>
    .valine-card {
        margin: 1.5rem auto;
    }

    .valine-card .card-content {
        padding: 20px 20px 5px 20px;
    }

    #vcomments textarea {
        box-sizing: border-box;
        background: url("/medias/comment_bg.png") 100% 100% no-repeat;
    }

    #vcomments p {
        margin: 2px 2px 10px;
        font-size: 1.05rem;
        line-height: 1.78rem;
    }

    #vcomments blockquote p {
        text-indent: 0.2rem;
    }

    #vcomments a {
        padding: 0 2px;
        color: #4cbf30;
        font-weight: 500;
        text-decoration: none;
    }

    #vcomments img {
        max-width: 100%;
        height: auto;
        cursor: pointer;
    }

    #vcomments ol li {
        list-style-type: decimal;
    }

    #vcomments ol,
    ul {
        display: block;
        padding-left: 2em;
        word-spacing: 0.05rem;
    }

    #vcomments ul li,
    ol li {
        display: list-item;
        line-height: 1.8rem;
        font-size: 1rem;
    }

    #vcomments ul li {
        list-style-type: disc;
    }

    #vcomments ul ul li {
        list-style-type: circle;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    #vcomments table, th, td {
        border: 0;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments h1 {
        font-size: 1.85rem;
        font-weight: bold;
        line-height: 2.2rem;
    }

    #vcomments h2 {
        font-size: 1.65rem;
        font-weight: bold;
        line-height: 1.9rem;
    }

    #vcomments h3 {
        font-size: 1.45rem;
        font-weight: bold;
        line-height: 1.7rem;
    }

    #vcomments h4 {
        font-size: 1.25rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    #vcomments h5 {
        font-size: 1.1rem;
        font-weight: bold;
        line-height: 1.4rem;
    }

    #vcomments h6 {
        font-size: 1rem;
        line-height: 1.3rem;
    }

    #vcomments p {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    #vcomments hr {
        margin: 12px 0;
        border: 0;
        border-top: 1px solid #ccc;
    }

    #vcomments blockquote {
        margin: 15px 0;
        border-left: 5px solid #42b983;
        padding: 1rem 0.8rem 0.3rem 0.8rem;
        color: #666;
        background-color: rgba(66, 185, 131, .1);
    }

    #vcomments pre {
        font-family: monospace, monospace;
        padding: 1.2em;
        margin: .5em 0;
        background: #272822;
        overflow: auto;
        border-radius: 0.3em;
        tab-size: 4;
    }

    #vcomments code {
        font-family: monospace, monospace;
        padding: 1px 3px;
        font-size: 0.92rem;
        color: #e96900;
        background-color: #f8f8f8;
        border-radius: 2px;
    }

    #vcomments pre code {
        font-family: monospace, monospace;
        padding: 0;
        color: #e8eaf6;
        background-color: #272822;
    }

    #vcomments pre[class*="language-"] {
        padding: 1.2em;
        margin: .5em 0;
    }

    #vcomments code[class*="language-"],
    pre[class*="language-"] {
        color: #e8eaf6;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }

    #vcomments b,
    strong {
        font-weight: bold;
    }

    #vcomments dfn {
        font-style: italic;
    }

    #vcomments small {
        font-size: 85%;
    }

    #vcomments cite {
        font-style: normal;
    }

    #vcomments mark {
        background-color: #fcf8e3;
        padding: .2em;
    }

    #vcomments table, th, td {
        padding: 12px 13px;
        border: 1px solid #dfe2e5;
    }

    table tr:nth-child(2n), thead {
        background-color: #fafafa;
    }

    #vcomments table th {
        background-color: #f2f2f2;
        min-width: 80px;
    }

    #vcomments table td {
        min-width: 80px;
    }

    #vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
        position: inherit;
        margin-left: -1.3rem;
        margin-right: 0.4rem;
        margin-top: -1px;
        vertical-align: middle;
        left: unset;
        visibility: visible;
    }
</style>

<div class="card valine-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="vcomments" class="card-content" style="display: grid">
    </div>
</div>

<script src="/libs/valine/av-min.js"></script>
<script src="/libs/valine/Valine.min.js"></script>
<script>
    new Valine({
        el: '#vcomments',
        appId: 'co0BUxGejd9ATTHU0ofThlQp-9Nh9j0Va',
        appKey: 'P0HtcTipPt7wyOTF8luYH3D4',
        notify: 'true' === 'true',
        verify: 'false' === 'true',
        visitor: 'true' === 'true',
        avatar: 'mm',
        pageSize: '10',
        lang: 'zh-cn',
        placeholder: 'just go go'
    });
</script>

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/posts/45357.html">
                    <div class="card-image">
                        
                        <img src="https://img-blog.csdnimg.cn/20210104161132375.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5ejAzMTIxOQ==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="javascript速查手册(持续更新中)">
                        
                        <span class="card-title">javascript速查手册(持续更新中)</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            javascript知识点速查数据类型
数值（number）：整数和小数（比如1和3.14）
字符串（string）：文本（比如Hello World）。
布尔值（boolean）：表示真伪的两个特殊值，即true（真）和false（假）

                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2020-12-27
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/web%E5%89%8D%E7%AB%AF/" class="post-category">
                                    web前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/web%E5%89%8D%E7%AB%AF/">
                        <span class="chip bg-color">web前端</span>
                    </a>
                    
                    <a href="/tags/HTML%E5%9F%BA%E7%A1%80/">
                        <span class="chip bg-color">HTML基础</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/posts/18122.html">
                    <div class="card-image">
                        
                        <img src="https://img-blog.csdnimg.cn/20210104161132375.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3p5ejAzMTIxOQ==,size_16,color_FFFFFF,t_70" class="responsive-img" alt="HTML速查手册(持续更新中)">
                        
                        <span class="card-title">HTML速查手册(持续更新中)</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            HTML知识点速查网页基本结构&lt;!DOCTYPE html>&lt;!--声明-->
&lt;html>&lt;!--根标签-->
    &lt;head>&lt;!--头部-->
        &lt;meta charset=
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2020-11-17
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/web%E5%89%8D%E7%AB%AF/" class="post-category">
                                    web前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/web%E5%89%8D%E7%AB%AF/">
                        <span class="chip bg-color">web前端</span>
                    </a>
                    
                    <a href="/tags/HTML%E5%9F%BA%E7%A1%80/">
                        <span class="chip bg-color">HTML基础</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>



<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


<!-- 代码块折行 -->

<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre !important; }
</style>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <footer class="page-footer bg-color">
    
    <div class="container row center-align" style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            <span id="year">2020</span>
            <a href="/about" target="_blank">风栾</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
            &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
                class="white-color">62.8k</span>&nbsp;字
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <span id="sitetime">载入运行时间...</span>
            <script>
                function siteTime() {
                    var seconds = 1000;
                    var minutes = seconds * 60;
                    var hours = minutes * 60;
                    var days = hours * 24;
                    var years = days * 365;
                    var today = new Date();
                    var startYear = "2020";
                    var startMonth = "7";
                    var startDate = "16";
                    var startHour = "0";
                    var startMinute = "0";
                    var startSecond = "0";
                    var todayYear = today.getFullYear();
                    var todayMonth = today.getMonth() + 1;
                    var todayDate = today.getDate();
                    var todayHour = today.getHours();
                    var todayMinute = today.getMinutes();
                    var todaySecond = today.getSeconds();
                    var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                    var diff = t2 - t1;
                    var diffYears = Math.floor(diff / years);
                    var diffDays = Math.floor((diff / days) - diffYears * 365);
                    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                        minutes);
                    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                        diffMinutes * minutes) / seconds);
                    if (startYear == todayYear) {
                        document.getElementById("year").innerHTML = todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffDays + " 天 " + diffHours +
                            " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    } else {
                        document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffYears + " 年 " + diffDays +
                            " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    }
                }
                setInterval(siteTime, 1000);
            </script>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/Guard3120" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:3144857232@qq.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=3144857232" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 3144857232" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>







    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>

</div>
    </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
$(function () {
    searchFunc("/search.xml", 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="/libs/materialize/materialize.min.js"></script>
    <script src="/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="/libs/aos/aos.js"></script>
    <script src="/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    

    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>
    

    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"model":{"jsonPath":"live2d-widget-model-haru"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":false,"abbrlink":null,"alg":"crc16","crc16(default) and crc32 rep":"hex"},"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>

</html>
